﻿<phone:PhoneApplicationPage 
    x:Class="Stopwatch.Infomation"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="STOPWATCH">
            <!--Pivot item one-->
            <controls:PivotItem Header="help">
                <ScrollViewer>
                    <Grid Margin="12 0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="360"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <StackPanel>
                            <TextBlock Text="How to start" FontSize="40" FontWeight="Bold"/>
                            <TextBlock Text="- Stopwatch" FontSize="24" FontWeight="Bold" 
                                       Foreground="{StaticResource PhoneAccentBrush}"/>
                            <RichTextBox>
                                <Paragraph>
                                    <Run Text="1. Start" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="Tab the "/>
                                    <Underline>
                                        <Run Text="Start Button"/>
                                    </Underline>
                                    <Run Text=", and then the Stopwatch starts to run."/>
                                </Paragraph>
                                <Paragraph></Paragraph>
                                <Paragraph>
                                    <Run Text="2. Pause" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="Tab the "/>
                                    <Underline>
                                        <Run Text="Pause Button"/>
                                    </Underline>
                                    <Run Text=", and the the Stopwatch will paused. The image below shows the paused state."/>
                                    <LineBreak/>
                                    <Run Text="        "/>
                                    <InlineUIContainer>
                                        <Image Style="{StaticResource helpPausedState}" Width="200"/>
                                    </InlineUIContainer>
                                </Paragraph>
                                <Paragraph></Paragraph>
                                <Paragraph>
                                    <Run Text="3. Split" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="Tab the "/>
                                    <Underline>
                                        <Run Text="Split Button"/>
                                    </Underline>
                                    <Run Text="split time will be added into the split list."/>
                                </Paragraph>
                                <Paragraph></Paragraph>
                                <Paragraph>
                                    <Run Text="4. Reset" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="Tab the "/>
                                    <Underline>
                                        <Run Text="Reset Button"/>
                                    </Underline>
                                    <Run Text=", the Stopwatch will be back to the original state."/>
                                </Paragraph>
                                <Paragraph></Paragraph>
                                <Paragraph>
                                    <Run Text="5. Start Screen Running Support" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="When Stopwatch is running, tab the "/>
                                    <Underline>
                                        <Run Text="Windows Button"/>
                                    </Underline>
                                    <Run Text=", the Stopwatch still run at background. Tab the "/>
                                    <Underline>
                                        <Run Text="Tile "/>
                                    </Underline>
                                    <Run Text="from Start Screen, and continue."/>
                                </Paragraph>
                            </RichTextBox>
                            
                            <TextBlock Margin="0, 30, 0, 0" 
                                       Text="- Timer" FontSize="24" FontWeight="Bold" 
                                       Foreground="{StaticResource PhoneAccentBrush}"/>
                            <RichTextBox>
                                <Paragraph>
                                    <Run Text="1. Setup Timer" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="Tab the "/>
                                    <Underline>
                                        <Run Text="Time Picker"/>
                                    </Underline>
                                    <Run Text=", choose the time which to strat the Timer."/>
                                    <LineBreak/>
                                    <Run Text="        "/>
                                    <InlineUIContainer>
                                        <Image Style="{StaticResource helpTimepicker}" Width="200"/>
                                    </InlineUIContainer>
                                </Paragraph>
                                <Paragraph></Paragraph>
                                <Paragraph>
                                    <Run Text="2. Start" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="Tab the "/>
                                    <Underline>
                                        <Run Text="Start Button"/>
                                    </Underline>
                                    <Run Text=", and then the Timer starts to run."/>
                                </Paragraph>
                                <Paragraph></Paragraph>
                                <Paragraph>
                                    <Run Text="3. Reset" FontWeight="Bold"/>
                                    <LineBreak/>
                                    <Run Text="Tab the "/>
                                    <Underline>
                                        <Run Text="Reset Button"/>
                                    </Underline>
                                    <Run Text=", the Timer will be back to the original state, shows the timepicker."/>
                                </Paragraph>
                                <Paragraph></Paragraph>
                            </RichTextBox>
                        </StackPanel>
                        <StackPanel Grid.Column="1">
                            <!-- icon from stopwatch -->
                            <Image Margin="0, 100, 0, 0" 
                                   Width="40" 
                                   Style="{StaticResource helpStartIcon}"/>
                            <TextBlock Text="Start" HorizontalAlignment="Center"/>

                            <Image Margin="0, 50, 0, 0"
                                   Width="40" 
                                   Style="{StaticResource helpPauseIcon}" />
                            <TextBlock Text="Pause" HorizontalAlignment="Center"/>

                            <Image Margin="0, 150, 0,0" 
                                   Width="40"
                                   Style="{StaticResource helpSplitIcon}"/>
                            <TextBlock Text="Split" HorizontalAlignment="Center"/>

                            <Image Margin="0, 40, 0,0" 
                                   Width="40" 
                                   Style="{StaticResource helpResetIcon}"/>
                            <TextBlock Text="Reset" HorizontalAlignment="Center"/>

                            <Image Margin="0, 30, 0,0"
                                   Width="40"
                                   Style="{StaticResource helpWindowsIcon}"/>

                            <Image Margin="0, 20, 0,0"
                                   Width="60"
                                   Style="{StaticResource helpTileIcon}"/>
                            <TextBlock Text="Tile" HorizontalAlignment="Center"/>

                            <!-- icon from timer -->
                            <Image Margin="0, 300, 0,0"
                                   Width="40"
                                   Style="{StaticResource helpStartIcon}"/>
                            <TextBlock Text="Start" HorizontalAlignment="Center"/>

                            <Image Margin="0, 40, 0,0" 
                                   Width="40"
                                   Style="{StaticResource helpResetIcon}"/>
                            <TextBlock Text="Reset" HorizontalAlignment="Center"/>
                        </StackPanel>
                    </Grid>
                </ScrollViewer>
            </controls:PivotItem>

            <!--Pivot item two-->
            <controls:PivotItem Header="about">
                <ScrollViewer>
                    <Grid x:Name="ContentPanel">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto" />
                            <RowDefinition Height="100" />
                        </Grid.RowDefinitions>
                        <RichTextBox Grid.Row="0" Margin="8,0,0,0">
                            <Paragraph FontSize="26">
                                <Run Text="STOPWATCH" FontSize="28" FontWeight="Bold"/>
                                <Run Text=" Version 1.5" FontSize="20"/>
                                <LineBreak />
                                <Run Text="Copyright (c) 2012 Junhua" FontSize="20"/>
                                <LineBreak />
                                <LineBreak />
                                <Run Text="Everybody needs a "/>
                                <Run Text="STOPWATCH" FontWeight="Bold"/>
                                <Run Text=" at some point. A Simple, Fast Windows Phone Stopwatch and Windows Phone Timer always available when you need it."/>
                            </Paragraph>
                            <Paragraph FontSize="26">
                                <LineBreak />
                                <Run Text="This is an open source project, you can download "/>
                                <Hyperlink NavigateUri="http://wpstopwatch.codeplex.com/" TargetName="_blank">
                                    <Run Text="STOPWATCH" FontWeight="Bold"/>
                                </Hyperlink>
                                <Run Text=" from Codeplex."/>
                            </Paragraph>
                        </RichTextBox>

                        <HyperlinkButton HorizontalAlignment="Left" Margin="10,0,0,0" FontSize="26" FontWeight="Bold" Foreground="{StaticResource PhoneAccentBrush}" Grid.Row="1" Content="Cool, I Like!" Click="RateOnClick"></HyperlinkButton>
                    </Grid>
                </ScrollViewer>
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Themes/Images/back.png" Text="back" Click="BackOnClick"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>